﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RapChieuPhim.DTO;
using System.Collections;
using RapChieuPhim.DAO;

namespace RapChieuPhim.BUS
{
    class RapBUS
    {
        public static RapDTO GetByID(int id)
        {
            RapDAO rDAO = new RapDAO();
            return rDAO.GetByID(id);
        }

        public static IList GetAll()
        {
            RapDAO rDAO = new RapDAO();
            return rDAO.GetAll();
        }

        public static int LayLastRap()
        {
            RapDAO rDAO = new RapDAO();
            return rDAO.LayLastRap();
        }

        public static IList GetAllbyMaRap(int id)
        {
            RapDAO rDAO = new RapDAO();
            return rDAO.GetAllbyMaRap(id);
        }

        public static void Insert(RapDTO Rap)
        {
            RapDAO rDAO = new RapDAO();
            rDAO.Insert(Rap);
        }

        public static void Update(RapDTO Rap)
        {
            RapDAO rDAO = new RapDAO();
            rDAO.Update(Rap);
        }

        public static void Delete(int id)
        {
            RapDAO rDAO = new RapDAO();
            rDAO.Delete(id);
        }
    }
}
